<template>
  <commonTable
    rowKey="floorId"
    :columns="roomTypeTableState.columns"
    :rules="rules"
    name="floor"
  >
    <template #form="{ record }">
      <a-form-item label="楼层" name="floorName">
        <a-input v-model:value="record.floorName"></a-input>
      </a-form-item>
    </template>
  </commonTable>
</template>

<script setup>
import { reactive, ref, watch } from "vue";
import { useStore } from "vuex";
import commonTable from "../../utils/CommonTable";
import { floor } from "@/api";

const store = useStore();
const roomTypeTableState = reactive({
  dataSource: [],
  columns: [
    {
      title: "序号",
      dataIndex: "floorId",
    },
    {
      title: "楼层",
      dataIndex: "floorName",
    },
    {
      title: "操作",
      slots: { customRender: "action" },
    },
  ],
});
const rules = {
  maxPeople: [
    { required: true, type: "number", min: 1, message: "必须为大于1的数字" },
  ],
  floorName: [{ required: true, message: "楼层不能为空" }],
  roomTagName: [{ required: true, message: "标签名不能为空" }],
};
</script>

<style scoped></style>
